<template>
	<view class="help">
		<comHead :title="$t('grzx.bzyfk')" :isLeft="true" :isRight="false"></comHead>
		<view class="list">
			<view class="item" v-for="(item,index) in list" @click="comLink('/pages/my/helpText?id='+item.id)">
				<text>{{item.title}}</text>
			</view>
		</view>
		<view class="btns">
			<text @click="comLink('/pages/my/feedback')">{{$t('grzx.yjfk')}}</text>
			<!-- #ifdef H5 -->
			<text @click="isQRPop=true">{{$t('grzx.lxkf')}}</text>
			<!-- #endif -->
			<!-- #ifdef MP-WEIXIN -->
			<button open-type="contact" style="border-radius: 0;display: flex;flex-direction: column;align-items: center;justify-content: center;margin-bottom: 0;">
				<text>{{$t('grzx.lxkf')}}</text>
			</button>
			<!-- #endif -->
			<!-- #ifdef MP-TOUTIAO -->
			<button open-type="im" data-im-id="rainforestzz" style="border-radius: 0;display: flex;flex-direction: column;align-items: center;justify-content: center;margin-bottom: 0;">
				<text>{{$t('grzx.lxkf')}}</text>
			</button>
			<!-- #endif -->
		</view>
		<view class="qr" v-if="isQRPop">
			<view class="qrBox">
				<image src="https://siha.vxmeng.com/static/index/qr-box-bg.png" mode=""></image>
				<image @click="isQRPop = false" src="https://siha.vxmeng.com/static/index/close.png" mode="widthFix"></image>
				<view class="tit">{{$t('index.kffw')}}</view>
				<view class="info">扫码添加官方客服咨询</view>
				<view class="qr-img">
					<image src="../../static/my/kf.jpg" mode="widthFix"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],
				isQRPop:false
			}
		},
		onShow() {
			this.getSystemHelpsList()
		},
		methods: {
			async getSystemHelpsList() {
				const res = await this.$myRequest({
					url: 'api/system/getSystemHelpsList',
					data: {}
				})
				if (res.code == 1) {
					console.log(res)
					this.list = res.data
				}
			}
		}
	}
</script>

<style lang="less" scoped>
	.help {


		.list {
			padding: 0 30rpx 30rpx 30rpx;
			box-sizing: border-box;
			height: calc(100vh - 350rpx);
			overflow: auto;

			.item {
				font-size: 30rpx;
				color: #fff;
				padding: 25rpx 0;
				border-bottom: 2rpx solid rgba(#535353, 0.3);
			}
		}

		.btns {
			display: flex;
			padding: 0 30rpx;
			align-items: center;
			justify-content: space-between;
			width: 100%;
			height: 180rpx;
			border-top: 4rpx solid rgba(#535353, 0.5);

			text {
				display: inline-flex;
				width: 300rpx;
				height: 80rpx;
				background: linear-gradient(270deg, #5F58FD 0%, #62B6FC 100%);
				align-items: center;
				justify-content: center;
				border-radius: 60rpx;
				color: #fff;
				font-size: 30rpx;
				line-height: 30rpx;
				text-align: center;
			}
		}
		.qr{
			width: 100vw;
			height: 100vh;
			background: rgba(#000, 0.9);
			position: fixed;
			top: 0;
			left: 0;
			z-index: 102;
			display: flex;
			justify-content: center;
			align-items: center;
			.qrBox{
				width: 588rpx;
				height: 884rpx;
				display: flex;
				flex-direction: column;
				align-items: center;
				position: relative;
				>image{
					width: 100%;
					height: 100%;
					position: absolute;
					z-index: -1;
					&:nth-child(2){
						width: 60rpx;
						height: 60rpx;
						bottom: -100rpx;
						left: 50%;
						transform: translateX(-50%);
					}
				}
				.tit{
					font-size: 48rpx;
					margin-top: 280rpx;
					height: 100rpx;
					text-align: center;
					padding: 0 70rpx;
					display: flex;
					align-items: center;
				}
				.info{
					margin-top: 20rpx;
					padding: 0 50rpx;
					text-align: center;
				}
				.qr-img{
					position: absolute;
					bottom: 146rpx;
					left: 182rpx;
					image{
						width: 228rpx;
						border-radius: 20rpx;
					}
				}
			}
		}
	}
</style>